package ControllingExecution;

import java.util.Random;

public class ForEach {
//	public static void ForEachInt(){
//		for(int i:range(10)) //0..9
//			printnb(i+" ");
//	}
	public static void ForEachString(){
		for(char c:"An African Swallow".toCharArray())
			System.out.print(c+" ");
	}
	public static void ForEachFloat(){
		Random rand=new Random(47);
		int in[]=new int[10];
		for (int i = 0; i < in.length; i++) {
			in[i]=rand.nextInt();
		}
		for(int y:in)
			System.out.println("int:"+y);
		float f[]=new float[10];
		for (int i = 0; i < f.length; i++) {
			f[i]=rand.nextFloat();
		}
		for(float x:f)
			System.out.println("float:"+x);
	}
	public static void main(String[] args) {
		ForEachFloat();
//		ForEachInt();
//		ForEachString();
	}
}
